package Cafezam;

import java.util.Scanner;

public class J10Circle {
	public static void main(String[] args)
	{
		
		double radius;
		double circleArea;
		double perim;
		
		makeScanner();
		radius=getradius(makeScanner());
		
		circleArea=getcircleArea(radius);
		perim=getperim(radius);
		System.out.println("원의 면적:"+circleArea);
		System.out.println("원의 둘레:"+perim);

	}

	private static double getradius(Scanner sc)
	{
		double radius;
		System.out.println("반지름값 입력");
		radius = sc.nextDouble();
		closeScanner(sc);
		return radius;
	}

	private static Scanner makeScanner() 
	{
		Scanner sc = new Scanner(System.in);
		return sc;
		
	}
	private static void closeScanner(Scanner sc) 
	{
		sc.close();
	}

	private static double getperim(double radius) {
		final double PI=3.14;
		return radius * 2 * PI;
	}

	private static double getcircleArea(double radius) {
		final double PI=3.14;
		return radius*radius*PI;
	}

}
